package com.my.demo.shiro.token;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * @author liangyuanshao
 * @date 2021/12/22 - 20:18
 */
public class SmsToken implements AuthenticationToken {

  private String phone;
  private String sms;
  private String token;

  public SmsToken(String phone, String sms,String token) {
    this.phone = phone;
    this.sms = sms;
    this.token = token;
  }

  public String getToken() {
    return token;
  }

  public void setToken(String token) {
    this.token = token;
  }

  @Override
  public Object getPrincipal() {
    return this.phone;
  }

  @Override
  public Object getCredentials() {
    return this.sms;
  }
}
